import React, { useRef, useState, useEffect } from "react";
// import { useSize } from "ahooks";
import useSize from "../../hooks/customs/useSize";


const TestUseSize = () => {
  const ref = useRef<HTMLDivElement>(null)
  const size = useSize(ref)
  return (
    <div ref={ref}>
      <p>改变窗口大小试试</p>
      <p>
        width: {size?.width}px, height: {size?.height}px
      </p>
    </div>
  );
}

export default TestUseSize
